
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>海尔商城</title>
	<style type="text/css">
			*{
			margin:0;
			padding:0;
		}
		ul,li{
			list-style: none;
		}
		html,body{
			width:100%;
			height:auto;
			padding:30px 0;
		}
		.container > div{
			width:100%;
			height:auto;
			float:left;
			margin-bottom:20px;
			border:1px solid #0097e0;
			background:#f5f9fd;
		}
		.partit{
			width:100%;
			height:50px;
			line-height: 30px;
			text-align: center;
			color:#666;
			font-size:18px;
			font-weight:bold;
			
		}
		.container > div{
			text-align: center;
			padding:5px 0;
		}
		.container ul{
			width:100%;
			height:auto;
		}
		.container ul li{
			width:100%;
			height:30px;
			line-height:30px;
			margin-bottom: 20px;
		}
		.container ul li span{
			width:40%;
			height:30px;
			line-height: 30px;
			text-align: right;
			color:#0097e0;
			display: block;
			float:left;
		}
		.container ul li p{
			width:60%;
			height:30px;
			line-height:30px;
			float:left;

		}
		.container ul li p input{
			width:50%;
			height:28px;
			border:1px solid #444;
			margin-left:30px;
		}
		.container ul li p input:focus{
			border:1px solid #0097e0;
			box-shadow: 0px 0px 5px #ccc;
		}
		 button{
			padding:6px 20px;
			background:#0097e0;
			border:none;
			outline:none;
			border-radius: 4px;
			color:#fff;
		}
		 button:hover{
			background:#0077e0;
		}
		#pushitem{
			height:30px;
			margin-left:30px;
		}
	</style>
</head>
<body>
	<div class="container">
		<button onclick="NTKF.im_openInPageChat()">打开聊窗</button>
		<button onclick="NTKF.im_openInPageChat('kf_4198_1505208999583')">接待组a</button>
		<button onclick="NTKF.im_openInPageChat('kf_4198_1505209031510')">接待组b</button>
		<button onclick="NTKF.im_openInPageChat('kf_4198_1505209007299')">接待组c</button>
		<button onclick="NTKF.im_openInPageChat('kf_4198_1505209036202')">接待组d</button>
		<div>
			<div class="partit">基础信息必填项</div>
				<ul>
					<li><span>访客id(uid):</span><p><input id="uid" type="text" name="uid"><br/></p></li>
					<li><span>访客名称(uname):</span><p><input id="uname" type="text" name="uname"><br/></p></li>
				</ul>
				<button id="basicbtn">登录</button>
				<button id='tuichu'>退出</button>
			</div>
		</div>
		<div>
				<div class="partit" style="float:left;">页面分类</div>
				<div style="float:left;width:100%;height:auto;"> 
					<button id="pageid1">首页</button>
					<button id="pageid2">列表页</button>
					<button id="pageid3">商品详情页</button>
					<button id="pageid4">购物车页</button>
					<button id="pageid5">订单填写也页</button>
					<button id="pageid6">订单提交成功页</button>
					<button id="pageid7">支付成功页</button>
				</div>
				
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
	NTKF_PARAM = {
		siteid:"kf_4198",		             //企业ID，为固定值，必填
		settingid:"kf_4198_1504696089789",	 //接待组ID，为固定值，必填
		uid:"",								 //用户ID，未登录可以为空，但不能给null，uid赋予的值在显示到小能客户端上
		itemid:'',	                
		uname:"",		     //用户名，未登录可以为空，但不能给null，uname赋予的值显示到小能客户端上
		isvip:"",                           //是否为vip用户，0代表非会员，1代表会员，取值显示到小能客户端上
		userlevel:"",		                 //网站自定义会员级别，0-N，可根据选择判断，取值显示到小能客户端上
		erpparam:"",                      //erpparam为erp功能的扩展字段，可选，购买erp功能后用于erp功能集成
		orderid:"",		         //订单ID
		orderprice:"",		             //订单总价
		ntalkerparam:{}
	}
	var arrstr = window.location.search;
	if( arrstr ){
		arrstr = arrstr.replace('?','');
		var arr = arrstr.split('&');
		for( var i=0 ; i<arr.length ; i++ ){
			var arr2 = arr[i].split('=');
			if( arr2[0] == "pageid" ){
				switch (arr2[1] ){
					case "1":

						break;
					case "2":
						NTKF_PARAM.ntalkerparam.brand = 'IPhone';
						NTKF_PARAM.ntalkerparam.category = '手机';
						document.title = '列表页';
						break;
					case "3":
						NTKF_PARAM.ntalkerparam.item = new Object();
						NTKF_PARAM.ntalkerparam.item.brand = 'IPhone';
						NTKF_PARAM.ntalkerparam.item.category = '手机';
						NTKF_PARAM.ntalkerparam.item.currency = 'RMB';
						NTKF_PARAM.ntalkerparam.item.customcolor = new Array();
						NTKF_PARAM.ntalkerparam.item.customcolor = ['可选颜色',"灰/白/黄/玫瑰金"];
						NTKF_PARAM.ntalkerparam.item.id='1001';
						NTKF_PARAM.ntalkerparam.item.imageurl='http://release-ts1.ntalker.com:140/rd/kf_8002//image/1001.jpg';
						NTKF_PARAM.ntalkerparam.item.marketprice='7200';
						NTKF_PARAM.ntalkerparam.item.name="IPHONE6s";
						NTKF_PARAM.ntalkerparam.item.siteprice="6180";
						NTKF_PARAM.ntalkerparam.item.url="http://release-ts1.ntalker.com:140/rd/kf_8002//index.php?keypage=3&goods_id=1001";
						NTKF_PARAM.ntalkerparam.item.name="IPHONE6s";
						document.title = '商品详情页';
						break;
					case "4":
						NTKF_PARAM.ntalkerparam.cartprice = "500.00";
						NTKF_PARAM.ntalkerparam.items  = new Array();
						NTKF_PARAM.ntalkerparam.items  = [{count:'1',id:'1001'},{count:'3',id:'1030'}];
						document.title = '购物车';
						break;
					case "5":
						NTKF_PARAM.ntalkerparam.items  = new Array();
						NTKF_PARAM.ntalkerparam.items  = [{count:'1',id:'1001'},{count:'3',id:'1030'}];
						document.title = '订单填写页';
						break;
					case "6":
						NTKF_PARAM.orderid  = "83004351";
						NTKF_PARAM.orderprice  = "180.00";
						document.title = '订单提交成功页 ';
						break;
					case "7":
						NTKF_PARAM.orderid  = "83004351";
						document.title = '支付成功页 ';
						break;
				}
			}else{
				NTKF_PARAM[arr2[0]] = arr2[1];
			}
			
		}
	}
	document.getElementById('basicbtn').onclick = function(){
		var uid = document.getElementById('uid').value;
		var uname = document.getElementById('uname').value;
		alert('?uid='+uid+'&uname='+uname);
		window.location.href = window.location.pathname +'?uid='+uid+'&uname='+uname;
	}
	document.getElementById('tuichu').onclick = function(){
		var uid = document.getElementById('uid').value;
		var uname = document.getElementById('uname').value;
		window.location.href = window.location.pathname;
	}
	document.getElementById('pageid1').onclick = function(){
		window.location.href = window.location.pathname +'?uid='+NTKF_PARAM.uid+'&uname='+NTKF_PARAM.uname+'&pageid=1';
	}
	document.getElementById('pageid2').onclick = function(){
		window.location.href = window.location.pathname +'?uid='+NTKF_PARAM.uid+'&uname='+NTKF_PARAM.uname+'&pageid=2';
	}
	document.getElementById('pageid3').onclick = function(){
		window.location.href = window.location.pathname +'?uid='+NTKF_PARAM.uid+'&uname='+NTKF_PARAM.uname+'&pageid=3';
	}
	document.getElementById('pageid4').onclick = function(){
		window.location.href = window.location.pathname +'?uid='+NTKF_PARAM.uid+'&uname='+NTKF_PARAM.uname+'&pageid=4';
	}
	document.getElementById('pageid5').onclick = function(){
		window.location.href = window.location.pathname +'?uid='+NTKF_PARAM.uid+'&uname='+NTKF_PARAM.uname+'&pageid=5';
	}
	document.getElementById('pageid6').onclick = function(){
		window.location.href = window.location.pathname +'?uid='+NTKF_PARAM.uid+'&uname='+NTKF_PARAM.uname+'&pageid=6';
	}
	document.getElementById('pageid7').onclick = function(){
		window.location.href = window.location.pathname +'?uid='+NTKF_PARAM.uid+'&uname='+NTKF_PARAM.uname+'&pageid=7';
	}
</script>
<script type="text/javascript" src="//dl.ntalker.com/js/xn6/ntkfstat.js?siteid=kf_4198" charset="utf-8"></script>
</html>
